---
title: | 
 |  \LARGE Supplemental Materials 
 | Appendix B
 | \vspace{0.5cm} \Large How Much Should We Trust Instrumental Variable Estimates in Political Science? Practical Advice based on 67 Replicated Studies
date: \today
abstractspacing: double
fontsize: 12pt
margin: 2cm
urlcolor: darkblue
linkcolor: Mahogany
citecolor: Mahogany
spacing: single
bibliography: references.bib
biblio-style: apalike
output:
  pdf_document:
    citation_package: natbib
    fig_caption: no
    number_sections: no
    keep_tex: no
    toc: true
    toc_depth: 3
    template: article-template.latex
---
[^auth01]: Independent Researcher; Email:[`lal.apoorva@gmail.com`](mailto:lal.apoorva@gmail.com).
[^auth02]: Postdoctoral Researcher, Yale University; Email:[`mwlockha@ucsd.edu`](mailto:mwlockha@ucsd.edu).
[^auth03]: Assistant Professor, Stanford University; Email:[`yiqingxu@stanford.edu`](mailto:yiqingxu@stanford.edu).
[^auth04]: PhD Student, University of California, San Diego; Email:[`zzu@ucsd.edu`](mailto:zzu@ucsd.edu).

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning=FALSE, message=FALSE,cache=TRUE)
knitr::opts_chunk$set(fig.width=7, fig.height=6, out.width = '70%', fig.align = "center") 
rm(list=ls())
library(remotes)
library(kableExtra)
library(haven)
library(tidyverse)
library(ivmodel)
library(doParallel)
library(foreach)
library(estimatr)
require(AER)
library(lfe)
library(glue)
path <- "~/Dropbox/ProjectZ/IV Sensitivity/LLXZ_rep/"
setwd(path)
knitr::opts_knit$set(root.dir = path)
library(ivDiag)
# number of cores
cores <- 15
```

\newpage

# Readme

* <tt>est_ols</tt> stores treatment effect estimates from the naive OLS estimation. 'Analytic' corresponds to analytic asymptotic standard errors (SEs) and confidence intervals (CIs). 'Boot.c' and 'Boot.t' represent inferential methods based on bootstrapped coefficients and bootstrapped t-statistics, respectively. 

* <tt>est_2sls</tt> stores treatment effect estimates from the 2SLS estimation. 

* <tt>AR</tt> stores results from the Anderson-Rubin test. The confidence region (CR) is produced by the inversion method. <tt>'AR.bounded = TRUE'</tt> means that the CR is bounded and not empty. 

* <tt>F.stat</tt> stores F statistics based on classic SEs (F.standard), H.W. robust SEs (F.robust), cluster-robust SEs (F.cluster), bootstrapped or cluster-bootstrapped SEs (F.bootstrap) and the effective F (F.effective). In the one-treatment-one-instrument case, F.effective is the same as F.robust (if there is no clustering structure) or F.cluster (if there is one). 

* <tt>rho</tt> stores the partial correlation coefficient between the treatment and the predicted treatment from the first stage regression. 

* <tt>tf.cF</tt> stores the results from the tF-cF procedure. Specifically, cF corresponds to the adjusted critical value based on the first stage (effective) F statistic for the subsequent t-test. 

* <tt>est_rf</tt> stores the results from the reduced form regression. The control variables are partialled out. 

* <tt>est_fs</tt> stores the results from the first stage regression. The control variables are partialled out. 

* <tt>p_iv</tt> stores the number of instruments. <tt>N</tt> and <tt>N_cl</tt> stores the the number of observations and the number of clusters (if there is a clustering structure), respectively.  <tt>df</tt> stores the degree of freedom from the 2SLS regression. 

* <tt>nvalues</tt> stores the numbers of unique values in the outcome, treatment, and instrument.


\newpage

# APSR


## @baccini2021

| Replication Summary | |
|--------|--------------|
| Unit of analysis | county |
| Treatment | Manufacturing Layoffs |
| Instrument | Bartik instrument |
| Outcome | Change of Democratic Vote Share |
| Model | Table2(3)|


```{r apsr_baccini_2021}
df <- readRDS("./rawdata/apsr_baccini_etal_2021.rds")
D <-"msl_pc4y2"
Y <- "ddem_votes_pct1"
Z <-  "bartik_leo5"
controls <- c("LAU_unemp_rate_4y", "pers_m_total_share_4y", "pers_coll_share_4y",
              "white_counties_4y", "msl_service_pc4y")
cl <- NULL
FE <- "id_state"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_baccini_2021_sav, echo = FALSE}
save(g, file="./estimate/Baccini2021.RData")
```



## @blattman2014

| Replication Summary | |
|--------|--------------|
| Unit of analysis | resident |
| Treatment | mass education campaign for dispute resolution |
| Instrument | assignment to treatment blocks |
| Outcome | serious land dispute |
| Model | Table9(8) |

```{r apsr_Blattman_etal_2014}
df <- readRDS("./rawdata/apsr_Blattman_etal_2014.rds")
df$district <- 0
for (i in 1:15) {df$district[which(df[,paste0("district",i)]==1)] <- i}
D <-"months_treated"
Y <- "fightweap_dummy"
Z <- c("block1", "block2", "block3")
controls <- c("ageover60", "age40_60", "age20_40", 
 "yrs_edu", "female", "stranger", "christian",
 "minority", "cashearn_imputedhst", "noland",
 "land_sizehst", "farm_sizehst", "lndtake_dum",
 "housetake_dum", "vsmall", "small", 
 "small2", "small3", "quartdummy", "cedulevel_bc",
 "ctownhh_log_el", "cwealthindex_bc", "cviol_experienced_bc",
 "clndtake_bc", "cviol_scale_bc", "clandconf_scale_bc",
 "cwitchcraft_scale_bc", "cpalaviol_imputed_bc",
 "cprog_ldr_beliefs_bc", "cattitudes_tribe_bc",
 "crelmarry_bc", "trainee")
cl <- "district"
FE <- "district"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r apsr_Blattman_etal_2014_sav, echo = FALSE}
save(g, file="./estimate/Blattman2014.RData")
```

## @colantone2018global

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | region |
| Treatment | regional-level import shock from China |
| Instrument | imports from China to the United States * local industrial structure |
| Outcome | leave share |
| Model|    Table1(6) |

```{r apsr_Colantone_etal_2018}
df<-readRDS("./rawdata/apsr_Colantone_etal_2018.rds")
D <-'import_shock'
Y <- "leave_share"
Z <- "instrument_for_shock"
controls <- c("immigrant_share", "immigrant_arrivals")
cl <- "fix"
FE <- "nuts1"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Colantone_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Colantone2018a.RData")
```

## @croke2016

| Replication Summary | |
|----------------|--------------------|
| Unit of analysis | individual |
| Treatment | education attainment |
| Instrument | access to the secondary education |
| Outcome | political participation |
| Model| Table2(b1) |

```{r apsr_Croke_etal_2016}
df <-readRDS("./rawdata/apsr_Croke_etal_2016.rds")
D <- "edu"
Y <- "part_scale"
Z <- "treatment"
controls <-NULL
cl<- "district"
FE<- "year_survey"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Croke_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Croke2016.RData")
```



## @dower2018 (a)

| Replication Summary | |
|----------------|--------------------|
| Unit of analysis | district\*year |
| Treatment | frequency of unrest |
| Instrument | religious polarization |
| Outcome | peasant representation |
| Model | Table3(1)|

```{r apsr_Dower_etal_2018a}
df <- readRDS("./rawdata/apsr_Dower_etal_2018.rds")
D <-"afreq"
Y <-"peasantrepresentation_1864"
Z <-"religpolarf4_1870"
controls <- c("distance_moscow", "goodsoil", "lnurban", "lnpopn", "province_capital")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Dower_etal_2018a_sav, echo = FALSE}
save(g, file="./estimate/Dower2018a.RData")
```



## @dower2018 (b)

| Replication Summary | |
|----------------|--------------------|
| Unit of analysis | district\*year |
| Treatment | frequency of unrest |
| Instrument | religious polarization |
| Outcome | peasant representation |
| Model|    Table1(2) |

```{r apsr_Dower_etal_2018b}
df <- readRDS("./rawdata/apsr_Dower_etal_2018.rds")
D <-"afreq"
Y <-"peasantrepresentation_1864"
Z <-"serfperc1"
controls <- c("distance_moscow", "goodsoil", "lnurban", "lnpopn", "province_capital")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Dower_etal_2018b_sav, echo = FALSE}
save(g, file="./estimate/Dower2018b.RData")
```


## @gerber2010

| Replication Summary | |
|--------|----------------|
| Unit of analysis | individual |
| Treatment | aligning party identification with latent partisanship |
| Instrument | being sent mail |
| Outcome | voting and party alignment scale |
| Model | Table4(1) |

```{r apsr_Gerber_etal_2010}
df <- readRDS("./rawdata/apsr_Gerber_etal_2010.rds")
D <-"pt_id_with_lean"
Y <- "pt_voteevalalignindex"
Z <- "treat"
controls <- c("pre_lean_dem", "age", "age2" ,"regyear" ,
              "regyearmissing", "twonames", "combined_female", 
              "voted2006", "voted2004", "voted2002", "voted2000",
              "voted1998", "voted1996", "interest", "pre_aligned_vh",
              "pre_direct_unemp", "pre_direct_econ","pre_direct_bushap",
              "pre_direct_congapp")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Gerber_etal_2010_sav, echo = FALSE}
save(g, file="./estimate/Gerber2010.RData")
```



## @hager2019ethnic

| Replication Summary | |
|-------|-----------------------|
| Unit of analysis | individual |
| Treatment | ethnic riots (destruction) |
| Instrument | distance to the nearest location where armored military vehicles were stolen |
| Outcome | prosocial behavior |
| Model|    Figure6 |

```{r apsr_Hager_etal_2019}
df <- readRDS("./rawdata/apsr_Hager_etal_2019.rds")
D <-"affected"
Y <- "pd_in_scale"
Z <-  "apc_min_distance"
controls <- NULL
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Hager_etal_2019_sav, echo = FALSE}
save(g, file="./estimate/Hager2019_apsr.RData")
```




## @hager2022does


| Replication Summary | |
|--------|--------------|
| Unit of analysis | individual |
| Treatment | number of secret police officers	 |
| Instrument | number of corrupted Catholic priests |
| Outcome | resistance |
| Model | Table3(2)|

```{r apsr_hager_2022}
df <- readRDS("./rawdata/apsr_Hager_Krakowski_2022.rds")

D <-"commanders"
Y <- "y"
Z <-  "priests_continuous"
controls <- NULL
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_hager_2022_sav, echo = FALSE}
save(g, file="./estimate/Hager2022.RData")
```



## @kapoor2018

| Replication Summary | |
|----------------|---------------------------|
| Unit of analysis | constituency\*election |
| Treatment | number of independent candidates |
| Instrument | changes in entry costs |
| Outcome | voter turnout |
| Model | Table4(b5) |

```{r apsr_Kapoor_etal_2018}
df<-readRDS("./rawdata/apsr_Kapoor_etal_2018.rds")
D <-'CitCand'
Y <- "Turnout"
Z <- "UnScheduledDepChange"
controls <- c("CitCandBaseTrend", "CitCandBaseTrendSq", "CitCandBaseTrendCu",
              "CitCandBaseTrendQu",  "TurnoutBaseTrend", "TurnoutBaseTrendSq",
              "TurnoutBaseTrendCu", "TurnoutBaseTrendQu", "LnElectors",
              "LagWinDist", "LagWinDistSq", "LagWinDistCu",
              "LagWinDistQu", "LagTightElection")
cl<- "constituency"
FE <- c("year","constituency")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Kapoor_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Kapoor2018.RData")
```




## @kuipers2022representational


| Replication Summary | |
|--------|--------------|
| Unit of analysis | municipality* year |
| Treatment | civil service reform	 |
| Instrument | statewide assignment mandate |
| Outcome | descriptive representation on an unrestricted sample |
| Model | Table1(2)|


```{r apsr_kuipers_2022}
df <- readRDS("./rawdata/apsr_kuipers_2022.rds")
df<-df%>%filter(occ=='blue_collar' & name=='white_x_native_born')
D <-"treat_actual"
Y <- "govt"
Z <-  "treat_assign"
controls <-"pop"
cl <- NULL
FE <- c("YEAR","city")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_kuipers_2022_sav, echo = FALSE}
save(g, file="./estimate/Kuipers2022.RData")
```


## @laitin2016

| Replication Summary | |
|----------------|-----------------------------------|
| Unit of analysis | country |
| Treatment | language choice |
| Instrument | geographic distance from the origins of writing |
| Outcome | human development index |
| Model | Table10(10) |

```{r apsr_Laitin_2016}
df <-readRDS("./rawdata/apsr_Laitin_2016.rds")
D <-"avgdistance_delta50"
Y <- "zhdi_2010"
Z <- "DIST_BGNC"
controls <- c("cdf2003","ln_GDP_Indp", "edes1975",
              "America","xconst")
cl<- NULL
FE<- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r apsr_Laitin_2016_sav, echo = FALSE}
save(g, file="./estimate/Laitin2016.RData")
```



## @meredith2013

| Replication Summary | |
|----------------|---------------------------------------|
| Unit of analysis | down-ballot race |
| Treatment | Democratic governor |
| Instrument | governor's home county |
| Outcome | down-ballot Democratic candidates' vote share |
| Model| Table3(5) |

```{r apsr_Meredith_2013}
df <-readRDS("./rawdata/apsr_Meredith_2013.rds")
Y <- "DemShareDB_res"
D<-"DemShareGOV_res"
Z <- "HomeGOV_res"
controls <- "HomeDB_res"
cl <- "fips"
FE<- NULL
weights<-NULL
(g <- ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r apsr_Meredith_2013_sav, echo = FALSE}
save(g, file="./estimate/Meredith2013.RData")
```



## @nellis2018

| Replication Summary |       |
|----------------|----------------------------------------------------------------|
| Unit of analysis | district\*election |
| Treatment | the proportion of MNA seats in a district won by secularist candidates |
| Instrument | narrow victory by secular parties in a district|
| Outcome | religious violence |
| Model| Table2(1) |

```{r apsr_Nellis_etal_2018}
df<-readRDS("./rawdata/apsr_Nellis_etal_2018.rds")
D <-'secular_win'
Y <- "any_violence"
Z <- "secular_close_win"
controls <-"secular_close_race"
cl <- "cluster_var"
FE <- "pro"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r apsr_Nellis_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Nellis2018.RData")
```




## @ritter2016

| Replication Summary | |
|----------------|-----------------------------------|
| Unit of analysis | province in 54 African countries\*day |
| Treatment | mobilized dissent |
| Instrument | rainfall |
| Outcome | repression |
| Model | Table1(3b) |

```{r apsr_Ritter_etal_2016}
df <- readRDS("./rawdata/apsr_Ritter_etal_2016.rds")
D <- "dissentcount"
Y <- "represscount"
Z <- c("lograin", "rainannualpct")
controls <-"urban_mean"
cl<- NULL
FE<- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r apsr_Ritter_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Ritter2016.RData")
```



# AJPS



## @barth2015

| Replication Summary | |
|----------------|-------------------------------------|
| Unit of analysis | country\*year |
| Treatment | wage inequality |
| Instrument | adjusted bargaining coverage; effective number of union confederations |
| Outcome | welfare support |
| Model | Table4(1)|

```{r ajps_Barth_etal_2015}
df<- readRDS("./rawdata/ajps_Barth_2015.rds")
D <-"ld9d1"
Y <- "welfareleft"
Z <- c("l2ip_adjcov5", "l2ip_enucfs")
controls <- c("lgdpgr", "lelderly", "llntexp", "lud", "ludsq", 
              "lechp", "lnet", "lannual", "ltrend", "ltrendsq")
cl <- FE <- "countrynumber"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Barth_etal_2015_sav, echo = FALSE}
save(g, file="./estimate/Barth2015.RData")
```


## @blair2022peacekeeping

| Replication Summary | |
|---------|---------------------|
| Unit of analysis |UN peacekeeping operations event level |
| Treatment | fragmentation of any given PKO mandate |
| Instrument | average fragmentation of all ongoing PKO mandates |
| Outcome | process performance |
| Model | TableD7(3)|



```{r ajps_blair_2022}
df <-readRDS("./rawdata/ajps_Blair_2022.rds")
df<-as.data.frame(df)
D<-"L_avg"
Y <- "sh_perfassist_pb"
Z <- "L_fract_assistv3"
  controls <- c("L_experman_assist_pbv3","L_numtask_assist_pbv3","L_lntot",
                "L_deployment","L_lnpop","L_lngdp","L_ucdpconflictspell","L_polity")
cl <- NULL
FE <- c("date3","iso3n")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_blair_2022_sav, echo = FALSE}
save(g, file="./estimate/Blair2022.RData")
```

## @carnegie2017

| Replication Summary | |
|----------------|----------------------------|
| Unit of analysis | country\*year |
| Treatment | foreign aid |
| Instrument | being a former colony of one of the Council members |
| Outcome | CIRI Human Empowerment index |
| Model | Table1(2)|

```{r ajps_Carnegie_etal_2017}
df<-readRDS("./rawdata/ajps_Carnegie_etal_2017.rds")
D <-"EV"
Y <- "new_empinxavg"
Z <- "l2CPcol2"
controls <- c( "covloggdp", "covloggdpCF", "covloggdpC",
              "covdemregionF", "covdemregion", "coviNY_GDP_PETR_RT_ZSF",
              "coviNY_GDP_PETR_RT_ZS", "covwvs_relF", "covwvs_rel",
              "covwdi_imp", "covwdi_fdiF", "covwdi_fdi",
              "covwdi_expF", "covwdi_exp", "covihme_ayemF", "covihme_ayem")
cl<-c("year","ccode")
FE <- c("year","ccode")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Carnegie_etal_2017_sav, echo = FALSE}
save(g, file="./estimate/Carnegie2017.RData")
```



## @chong2019

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | household |
| Treatment | actual proportion of households treated in the locality |
| Instrument | treatment assignment in get-out-to-vote campaigns |
| Outcome | voted in 2013 presidential election |
| Model | Table4(1)|

```{r ajps_Chong_etal_2019}
df <-readRDS("./rawdata/ajps_Chong_etal_2019.rds")
D <-"ratio_treat"
Y <- "elecc_presid2013"
Z <- c("D2D30", "D2D40", "D2D50")
controls <-c("age", "married", "children", "num_children",
             "employed", "languag", "yrseduc", "bornloc",
             "hh_asset_index", "log_pop", "mujeres_perc",
             "pob_0_14_perc", "pob_15_64_perc", "pob_65mas_perc",
             "analfabetos_perc", "asiste_escuela_perc", 
             "TASA_women", "TASA_men", "electricidad_perc",
             "agua_perc", "desague_perc", "basura_perc",
             "fono_fijo_perc", "fono_cel_perc", "ocupantes", 
             "Rural",  "distancia2_final", "db_age", 
             "db_married", "db_children", "db_num_children", 
             "db_employed", "db_languag", "db_yrseduc", 
             "db_bornloc", "db_hh_asset_index", "db_log_pop", 
             "db_mujeres_perc", "db_pob_0_14_perc", 
             "db_pob_15_64_perc", "db_pob_65mas_perc", 
             "db_analfabetos_perc", "db_asiste_escuela_perc",
             "db_TASA_women", "db_TASA_men", "db_electricidad_perc",
             "db_agua_perc", "db_desague_perc", "db_basura_perc",
             "db_fono_fijo_perc", "db_fono_cel_perc", 
             "db_ocupantes", "db_Rural", "db_distancia2_final",
             "dpto1", "elecc_presid2008", "db_elecc_presid2008")
cl <- "loc"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_Chong_etal_2019_sav, echo = FALSE}
save(g, file="./estimate/Chong2019.RData")
```



## @colantone2018

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | region\*year |
| Treatment | regional import shock from China |
| Instrument | Chinese imports to the United States |
| Outcome | Economic nationalism |
| Model | Table1(1)|

```{r ajps_Colantone_etal_2018}
df <-readRDS("./rawdata/ajps_Colantone_etal_2018.rds")
D <-"import_shock"
Y <- "median_nationalism"
Z <- "instrument_for_shock"
controls <- NULL
cl <- "nuts2_year"
FE <- "fix_effect"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Colantone_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Colantone2018b.RData")
```




## @coppock2016

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | individual |
| Treatment | voting in November 2007 municipal elections |
| Instrument | mailing showing 2005 Vote |
| Outcome | voting in the 2008 presidential primary |
| Model | Table2(2)|

```{r ajps_Coppock_etal_2016}
df<-readRDS("./rawdata/ajps_Coppock_etal_2016.rds")
D <-"og2007"
Y <- "JAN2008"
Z <- "treat2"
controls <- NULL
cl <- "hh"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Coppock_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Coppock2016.RData")
```



## @delao2013

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | village |
| Treatment | early coverage of Conditional Cash Transfer |
| Instrument | random assignment to early coverage |
| Outcome | incumbent party's vote share |
| Model | Table3(b1)|

```{r ajps_De_La_O_2013}
df <- readRDS("./rawdata/ajps_De_La_O_2013.rds")
D <-"early_progresa_p"
Y <- "t2000"
Z <- "treatment"
controls <- c("avgpoverty","pobtot1994", "votos_totales1994", 
              "pri1994", "pan1994", "prd1994")
cl <- NULL
FE <- "villages"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_De_La_O_2013_sav, echo = FALSE}
save(g, file="./estimate/Delao2013.RData")
```



## @goldstein2017

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | city |
| Treatment | lobbying spending |
| Instrument | direct flight to Washington, DC |
| Outcome | total earmarks or grants awarded |
| Model | Table4(4)|

```{r ajps_Goldstein_etal_2017}
df <- readRDS("./rawdata/ajps_Goldstein_etal_2017.rds")
df <- as.data.frame(df)
Y <-"ln_recovery"
D <-"ln_citylob"
Z <- c("direct_flight_dc", "diverge2_r")
controls <- c("pop_r", "land_r", "water_r", "senior_r", "student_r", "ethnic_r",
              "mincome_r", "unemp_r", "poverty_r", "gini_r", "city_propertytaxshare_r", 
              "city_intgovrevenueshare_r", "city_airexp_r", "houdem_r", "ln_countylob")
cl <- "state2"
FE <- "state2"
weights <- NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl, weights=weights, cores = cores, parallel = TRUE))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_Goldstein_etal_2017_sav, echo = FALSE}
save(g, file="./estimate/Goldstein2017.RData")
```



## @hager2019 a

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | city |
| Treatment | equiTable inheritance customs |
| Instrument | mean elevation |
| Outcome | female representation |
| Model | Table3(1)|

```{r ajps_Hager_etal_2019a}
df<-readRDS("./rawdata/ajps_Hager_etal_2019.rds")
D <-"fair_dic"
Y <- "gem_women_share"
Z <- "elev_mean"
controls <- c("lon", "lat", "childlabor_mean_1898",
              "support_expenses_total_capita","gem_council",
              "gem_pop_density","pop_tot")
cl<- NULL
FE<- c("state2","law_cat2")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Hager_etal_2019a_sav, echo = FALSE}
save(g, file="./estimate/Hager2019ajps_a.RData")
```



## @hager2019 b

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | city |
| Treatment | equiTable inheritance customs |
| Instrument | distance to rivers |
| Outcome | female representation |
| Model | Table3(2)|

```{r ajps_Hager_etal_2019b}
df<-readRDS("./rawdata/ajps_Hager_etal_2019.rds")
D <-"fair_dic"
Y <- "gem_women_share"
Z <-"river_dist_min"
controls <- c("lon", "lat", "childlabor_mean_1898",
              "support_expenses_total_capita","gem_council",
              "gem_pop_density","pop_tot")
cl<- NULL
FE<- c("law_cat2")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Hager_etal_2019b_save, echo = FALSE}
save(g, file="./estimate/Hager2019ajps_b.RData")
```



## @hong2022strongman

| Replication Summary | |
|---------|---------------------|
| Unit of analysis |township |
| Treatment | NVM subsidy per voter |
| Instrument | Terrain elevation slope |
| Outcome | Park’s vote share in 2012 |
| Model | Table3(3)|


```{r ajps_Hong_2022}
df <-readRDS("./rawdata/ajps_Hong_etal_2022.rds")
df<-as.data.frame(df)
D<-"total_Lamount_1974_1978_perelect" 
Y <- "E18ConsSh"
Z <- c("te_median1", "ts_median1")
controls <- c("area_1970","demo_female_share_1966","demo_age_15plus_1966",
              "demo_illiterate_1966","demo_pop_ch_1970_1966","E17ConsSh","eup")
cl <- "CTY_cd"
FE <- "CTY_cd"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Hong_2022_sav, echo = FALSE}
save(g, file="./estimate/Hong2022.RData")
```




## @kim2019

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | municipality\*year |
| Treatment | Democratic institutions |
| Instrument | population threshold |
| Outcome | women political engagement |
| Model | Table2(1)|

```{r ajps_Kim_2019}
df<- readRDS("./rawdata/ajps_Kim_2019.rds")
D <-"direct"
Y <- "wm_turnout"
Z <-  "new"
controls <- c("left", "wm_voters", "enep")
cl <- NULL
FE <- "year"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Kim_2019_sav, echo = FALSE}
save(g, file="./estimate/Kim2019.RData")

```


## @kocher2011

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | hamlet (smallest population unit) |
| Treatment | aerial bombing |
| Instrument | past insurgent control |
| Outcome | changes in local control |
| Model | Table5(5B)|

```{r ajps_Kocher_etal_2011}
df<-readRDS("./rawdata/ajps_Kocher_etal_2011.rds")
D <-"bombed_969"
Y<- "mod2a_1adec"
Z <- c("mod2a_1ajul", "mod2a_1aaug")
controls <- c("mod2a_1asep", "score", "ln_dist", "std", "lnhpop")
cl<- NULL
FE <-NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Kocher_etal_2011_sav, echo = FALSE}
save(g, file="./estimate/Kocher2011.RData")
```



## @lelkes2017

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | state\*year |
| Treatment | number of broadband Internet providers |
| Instrument | state-level ROW index |
| Outcome | affective polarization |
| Model | Table1(3)|

```{r ajps_Lelkes_2017}
df<-readRDS("./rawdata/ajps_Lelkes_2017.rds")
D <-"D"
Y <- "outcome"
Z <- "Total_log"
controls <- c("region", "percent_black", "percent_white", 
              "percent_male", "lowed", "unemploymentrate",
              "density", "HHINC_log")
cl<- "state"
FE <- "year"
weights=NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_Lelkes_2017_sav, echo = FALSE}
save(g, file="./estimate/Lelkes2017.RData")
```


## @lopez2020policy


| Replication Summary | |
|---------|---------------------|
| Unit of analysis | individual |
| Treatment | town-hall meetings |
| Instrument | assignment to treatment |
| Outcome | voting behavior |
|Model|figure3(2)|

```{r ajps_Moctezuma_etal_2020}
df <-readRDS("./rawdata/ajps_Moctezuma_etal_2020.rds")
df<-as.data.frame(df)
D<-"treatment"
Y <- "vote"
Z <- "assignment"
  controls <- NULL
cl <- "barangay"
FE <- "city"
weights<-"weight.att"
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Moctezuma_etal_2020_sav, echo = FALSE}
save(g, file="./estimate/Lopez2020.RData")
```



## @mcclendon2014

| Replication Summary | |
|---------|---------------------|
| Unit of analysis | individual |
| Treatment | reading social esteem promising email |
| Instrument | assignment to treatment |
| Outcome | participation in LGBTQ events |
| Model | Table2(1)|

```{r ajps_McClendon_2014}
df <- readRDS("./rawdata/ajps_McClendon_2014.rds")
D<-"openedesteem"
Y<- "intended"
Z <- "esteem"
controls <- NULL
cl<- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_McClendon_2014_sav, echo = FALSE}
save(g, file="./estimate/McClendon2014.RData")
```




## @rueda2017

| Replication Summary | |
|----------------|-----------------------|
| Unit of analysis | city |
| Treatment | actual polling place size. |
| Instrument | the size of the polling station |
| Outcome | citizens' reports of electoral manipulation |
| Model | Table5(1)|

```{r ajps_Rueda_2017}
df <- readRDS("./rawdata/ajps_Rueda_2017.rds")
D <-"lm_pob_mesa"
Y <- "e_vote_buying"
Z <- "lz_pob_mesa_f"
controls <- c("lpopulation", "lpotencial")
cl <- "muni_code"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_Rueda_2017_sav, echo = FALSE}
save(g, file="./estimate/Rueda2017.RData")
```



## @sexton2019

| Replication Summary | |
|----------------|-------------------------------|
| Unit of analysis | department\*year |
| Treatment | health budget |
| Instrument | soldier fatalities |
| Outcome | health social service |
| Model | Table3(1)|

```{r ajps_Sexton_etal_2019}
df <-readRDS("./rawdata/ajps_Sexton_etal_2019.rds")
D<-"socialservice_b"
Y <- "Finfant_mortality"
Z <- "Lgk_budget"
controls <- c("Lgk_prebudget", "ln_pbi_pc", "execution_nohealth")
cl <- "deptcode"
FE <- c("year","deptcode")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Sexton_etal_2019_sav, echo = FALSE}
save(g, file="./estimate/Sexton2019.RData")
```




## @spenkuch2018

| Replication Summary | |
|----------------|------------------------------------------------|
| Unit of analysis | electoral district |
| Treatment | religion of voters living in the same areas more than three and a half centuries later |
| Instrument | individual princes' decisions concerning whether to adopt Protestantism |
| Outcome | Nazi vote share |
| Model | Table2(B1)|

```{r ajps_Spenkuch_etal_2018}
df <-readRDS("./rawdata/ajps_Spenkuch_etal_2018.rds")
D <-"r_1925C_kath"
Y <- "r_NSDAP_NOV1932_p"
Z <- c("r_kath1624", "r_gem1624")
controls <- c("r_1925C_juden", "r_1925C_others", 
              "r_M1925C_juden","r_M1925C_others")
cl <- 'WKNR'
FE <- NULL
weights="r_wahlberechtigte_NOV1932"
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Spenkuch_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Spenkuch2018.RData")
```


## @stokes2016

| Replication Summary | |
|----------------|-------------|
| Unit of analysis | precinct |
| Treatment | turbine location |
| Instrument | wind speed |
| Outcome | vote turnout |
| Model | Table2(2)|

```{r ajps_Stokes_2016}
df<-readRDS("./rawdata/ajps_Stokes_2016.rds")
D <-"prop_3km"
Y <- "chng_lib"
Z <- "avg_pwr_log"
controls <- c("mindistlake", "mindistlake_sq", "longitude", 
              "long_sq", "latitude", "lat_sq", "long_lat")
cl <- NULL
FE <- "ed_id"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Stokes_2016_sav, echo = FALSE}
save(g, file="./estimate/Stokes2016.RData")
```

## @tajima2013

| Replication Summary | |
|----------------|----------------------|
| Unit of analysis | village and urban neighborhood |
| Treatment | distance to police posts (as a proxy for exposure to military intervention) |
| Instrument | distance to health station |
| Outcome | incidence of communal violence |
| Model | Table1(4)|

```{r ajps_Tajima_2013}
df<-readRDS("./rawdata/ajps_Tajima_2013.rds")
D <-"z2_distpospol"
Y <- "horiz2"
Z <- "z2_dispuskes"
controls <- c("flat", "z2_altitude","urban", "natres", "z2_logvillpop", "z2_logdensvil",
              "z2_povrateksvil", "z2_fgtksvild", "z2_covyredvil", "z2_npwperhh", 
              "z2_ethfractvil","z2_ethfractsd", "z2_ethfractd", "z2_relfractvil", 
              "z2_relfractsd", "z2_relfractd", "z2_ethclustsd", "z2_ethclustvd", 
              "z2_relclustsd", "z2_relclustvd", "z2_wgcovegvil", "z2_wgcovegsd", 
              "z2_wgcovegd", "z2_wgcovrgvil", "z2_wgcovrgsd", "z2_wgcovrgd",
              "natdis","javanese_off_java", "islam", "split_kab03", "split_vil03")
cl <- 'kabid03'
FE <- 'prop'
weights<-"probit_touse_wts03"
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Tajima_2013_sav, echo = FALSE}
save(g, file="./estimate/Tajima2013.RData")
```



## @trounstine2016

| Replication Summary | |
|----------------|-----------------------------|
| Unit of analysis | city\*year |
| Treatment | racial segregation |
| Instrument | the number of waterways in a city; logged population |
| Outcome | direct general expenditures |
| Model | Table5(1)|

```{r ajps_Trounstine_2016}
df<-readRDS("./rawdata/ajps_Trounstine_2016.rds")
D <-"H_citytract_NHW_i"
Y <- "dgepercap_cpi"
Z <- c("total_rivs_all", "logpop")
controls <- c("dgepercap_cpilag","diversityinterp","pctblkpopinterp",
              "pctasianpopinterp","pctlatinopopinterp","medincinterp",
              "pctlocalgovworker_100","pctrentersinterp","pctover65",
              "pctcollegegradinterp","northeast","south","midwest", 
              "y5", "y6", "y7", "y8", "y9")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r ajps_Trounstine_2016_sav, echo = FALSE}
save(g, file="./estimate/Trounstine2016.RData")
```




## @vernby2013

| Replication Summary | |
|----------------|-------------------------------------|
| Unit of analysis | municipality\*term |
| Treatment | share of noncitizens in the electorate |
| Instrument | immigration Inflow 1940--1950; Immigration Inflow 1960--1967 |
| Outcome | municipal education and social spending |
| Model | Table3(2)|

```{r ajps_Vernby_2013}
df<-readRDS("./rawdata/ajps_Vernby_2013.rds")
D <-"noncitvotsh"
Y <- "Y"
Z <- c("inv1950", "inv1967")
controls <- c("Taxbase2", "L_Taxbase2", "manu", "L_manu", "pop", "L_pop")
cl <- "lan"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Vernby_2013_sav, echo = FALSE}
save(g, file="./estimate/Vernby2013.RData")
```




## @wood2022campaign


| Replication Summary | |
|----------------|-------------------------------|
| Unit of analysis |House member/district |
| Treatment | incumbent found to have campaign finance violations |
| Instrument | audit |
| Outcome | legislator Retired |
| Model | Table2(1)|


```{r ajps_Wood_grose_2022}
df <-readRDS("./rawdata/ajps_Wood_grose_2022.rds")
## preprocess to generate xwhat and xhat in Stata
D<-"findings" 
Y <- "retire__or_resign"
Z <- "audited"
controls <-c("xwhat","south")
cl <- "stcd"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Wood_grose_2022_sav, echo = FALSE}
save(g, file="./estimate/Wood2022.RData")
```


## @zhu2017

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | province\*period |
| Treatment | MNC activity |
| Instrument | weighted geographic closeness |
| Outcome | corruption |
| Model | Table1(1)|

```{r ajps_Zhu_2017}
df <- readRDS("./rawdata/ajps_Zhu_2017.rds")
D <-"MNC"
Y <- "corruption1"
Z <- "lwdist"
controls <- c("lgdpcap6978", "gdp6978", "population", "lgovtexp9302", 
              "pubempratio", "leduc", "pwratio", "female", "time")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r ajps_Zhu_2017_sav, echo = FALSE}
save(g, file="./estimate/Zhu2017.RData")
```



# JOP




## @acharya2016

| Replication Summary | |
|----------------|--------------------------------|
| Unit of analysis | county |
| Treatment | slave proportion in 1860 |
| Instrument | measures of the environmental suitability for growing cotton |
| Outcome | proportion Democrat |
| Model| Table2(2)|

```{r jop_Acharya_etal_2016}
df<-readRDS("./rawdata/jop_Acharya_etal_2016.rds")
Y <- "dem"
D <-"pslave1860"
Z <- "cottonsuit"
controls <- c("x2", "rugged", "latitude", "x2", "longitude", "x3","x4", "water1860")
cl <- NULL
FE <- 'code'
weights<-"sample.size"
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Acharya_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Acharya2016.RData")
```




## @alt2015

| Replication Summary | |
|----------------|----------------------|
| Unit of analysis | individual |
| Treatment | unemployment expectations |
| Instrument | assignment to receiving an aggregate unemployment forecast |
| Outcome | vote intention |
| Model|Table2(1)|

```{r jop_Alt_etal_2015}
df<- readRDS("./rawdata/jop_Alt_etal_2015.rds")
D <- "urate_fut"
Y <- "gov"
Z <- "treatment"
controls <- "urate_now"
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Alt_etal_2015_sav, echo = FALSE}
save(g, file="./estimate/Alt2015.RData")
```

## @arias2019large

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | country\*year |
| Treatment | government expenditures |
| Instrument | trade shock $\times$ UK bond yield |
| Outcome | regular leader turnover |
| Model | Table3(2)|

```{r jop_Arias_etal_2019}
# Variables are already residualized against controls, fixed effects, and unit-specific trends
df<-readRDS("./rawdata/jop_Arias_etal_2019.rds")
Y <- "regular_res"
D <- "dexpenditures_res"
Z <- "interact_res"
controls <- NULL
cl<-c("ccode","year")
FE<-NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Arias_etal_2019_sav, echo = FALSE}
save(g, file="./estimate/Arias2019.RData")
```




## @bhavnani2018

| Replication Summary | |
|----------------|---------------------------|
| Unit of analysis | district\*period |
| Treatment | bureaucrats' embeddedness |
| Instrument | early-career job assignment |
| Outcome | proportion of villages with high schools |
| Model | Table1(4)|

```{r jop_Bhavnani_etal_2018}
df <-readRDS("./rawdata/jop_Bhavnani_etal_2018.rds")
D <- "ALLlocal"
Y <- "Phigh"
Z <- "EXALLlocal"
controls <- c("ALLbachdivi", "lnnewpop", "lnnvill", "p_rural", "p_work",
              "p_aglab", "p_sc", "p_st", "lnmurderpc", "stategov", "natgov")
cl <- "distcode71"
FE<- c('distcode71',"year")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Bhavnani_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Bhavnani2018.RData")
```


## @charron2013

| Replication Summary | |
|----------------|-------------------------|
| Unit of analysis | region |
| Treatment | clientelism |
| Instrument | consolidation of clientelistic networks in regions where rulers have historically less constraints to their decisions |
| Outcome | quality of governments |
| Model | Table3(2a)|

```{r jop_Charron_etal_2013}
df<-readRDS("./rawdata/jop_Charron_etal_2013.rds")
D <- "pc_all4_tol"
Y <- "eqi"
Z <- c("pc_institutions","literacy1880")
controls <- c("logpop", "capitalregion", "ger", "it", "uk","urb_1860_1850_30")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Charron_etal_2013_sav, echo = FALSE}
save(g, file="./estimate/Charron2013.RData")
```


## @charron2017

| Replication Summary | |
|----------------|-----------------------------------------|
| Unit of analysis | region |
| Treatment | more developed bureaucracy |
| Instrument | proportion of Protestant residents in a region; aggregate literacy in 1880 |
| Outcome | percent of single bidders in procurement contracts |
| Model | Table5(4)|

```{r jop_Charron_etal_2017}
df <- readRDS("./rawdata/jop_Charron_etal_2017.rds")
D <- "pubmerit"
Y <- "lcri_euc1_r"
Z <- c("litrate_1880", 'pctprot')
controls <- c("logpopdens", "logppp11", "trust", "pctwomenparl")
cl <- "country"
FE <- NULL
weights<-"eu_popweights"
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Charron_etal_2017_sav, echo = FALSE}
save(g, file="./estimate/Charron2017.RData")
```


## @cirone2018

| Replication Summary | |
|----------------|--------------------------|
| Unit of analysis | deputy\*year |
| Treatment | budget committee service |
| Instrument | random assignment of budget incumbents to bureaux |
| Outcome | legislator sponsorship on a budget bill |
| Model | Table2(2)|

```{r jop_Cirone_etal_2018}
df<- readRDS("./rawdata/jop_Cirone_etal_2018.rds")
D <- "budget"
Y <- "F1to5billbudgetdummy"
Z <- "bureauotherbudgetincumbent"
controls <- c("budgetincumbent", "cummyears", "cummyears2",
              "age", "age2", "permargin", "permargin2",
              "inscrits", "inscrits2", "proprietaire", 
              "lib_all", "civil", "paris")
cl <- c("id","year")
FE <- "year"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Cirone_etal_2018_sav, echo = FALSE}
save(g, file="./estimate/Cirone2018.RData")
```



## @dietrich2015

| Replication Summary | |
|----------------|--------------------|
| Unit of analysis | transition |
| Treatment | economic aid |
| Instrument | constructed Z |
| Outcome | transitions to multipartyism |
| Model | Table1(2)|

```{r jop_Dietrich_2015}
df <- readRDS("./rawdata/jop_Dietrich_2015.rds")
D <- "econaid"
Y <- "mp"
Z <- c("Iinfl3","econaid_lgdp_g", "econaid_lpop_g",
       "econaid_cwar_g", "econaid_dnmp_g",
       "econaid_dnmp2_g", "econaid_dnmp3_g")
controls <- c('lgdp', 'lpop', 'cwar', 'dmp', 
              'dmp2', 'dmp3', "dnmp", "dnmp2", "dnmp3")
cl<- "cowcode"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Dietrich_2015_sav, echo = FALSE}
save(g, file="./estimate/Dietrich2015.RData")
```


## @digiuseppe2022us

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | country*year |
| Treatment | US support |
| Instrument | echelon corridor |
| Outcome | property rights |
| Model | Table1(5)|

```{r jop_digiuseppe_2022}
df <-readRDS("./rawdata/jop_digiuseppe_2022.rds")
D <- "wi_usa_median"
Y<-"Fwi_v2stfisccap2"
Z <- "Echelon2"
controls <-c("wi_v2xcl_prpty","wi_compete", "wi_lnpop_wdi",
             "wi_lngdppc", "wi_polity2", "wi_polity2_2",  "wi_ny_gdp_totl_rt_zs",
             "wi_cwyrs", "wi_c2", "wi_c3", "coldwar")
cl<- NULL
FE<- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_digiuseppe_2022_sav, echo = FALSE}
save(g, file="./estimate/Digiuseppe2022.RData")
```


## @dube2015

| Replication Summary | |
|----------------|-----|
| Unit of analysis |  municipality\*year |
| Treatment |  changes in US funding to Colombia |
| Instrument |  US funding in countries outside of Latin America |
| Outcome |  the number of paramilitary attacks |
| Model | Table1(1)|

```{r jop_Dube_etal_2015}
df<-readRDS("./rawdata/jop_Dube_etal_2015.rds")
D <- "bases6xlrmilnar_col"
Y <- "paratt"
Z <- "bases6xlrmilwnl"
controls <-"lnnewpop" 
cl <- "municipality"
FE <- c("year","municipality")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Dube_etal_2015_sav, echo = FALSE}
save(g, file="./estimate/Dube2015.RData")
```


## @feigenbaum2015

| Replication Summary | |
|----------------|------------------------------------|
| Unit of analysis | congressional district\*decade |
| Treatment | localized trade shocks in congressional districts |
| Instrument | Chinese exports to other economies\*local exposure |
| Outcome | trade score based on congressional voting |
| Model | Table1(3)|

```{r jop_Feigenbaum_etal_2015}
df<-readRDS("./rawdata/jop_Feigenbaum_etal_2015.rds")
D <-"x"
Y <- "tradescore"
Z <- "z"
controls <- c("dem_share")
cl <- "state_cluster"
FE <- "decade"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Feigenbaum_etal_2015_sav, echo = FALSE}
save(g, file="./estimate/Feigenbaum2015.RData")
```


## @flores-macias2013

| Replication Summary | |
|----------------|----------------------------|
| Unit of analysis | country\*year |
| Treatment | trade volume |
| Instrument | lagged energy production |
| Outcome | foreign policy convergence |
| Model | Table2(1)|

```{r jop_Flores_etal_2013}
df<- readRDS("./rawdata/jop_Flores_etal_2013.rds")
D <- "log_tot_trade"
Y <- "log_HRVOTE"
Z <- "lag_log_energ_prod"
controls <- c("log_cinc", "us_aid100", "log_tot_ustrade", 
              "Joint_Dem_Dum", "pts_score", "dummy2004")
cl <- NULL
FE <- 'statea'
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Flores_etal_2013_sav, echo = FALSE}
save(g, file="./estimate/Flores2013.RData")
```



## @gehlbach2012

| Replication Summary | |
|----------------|--------------------------------------|
| Unit of analysis | nondemocratic episode |
| Treatment | age of ruling party less leader years in office |
| Instrument | whether the first ruler in a nondemocratic episode is a military leader |
| Outcome | private invest |
| Model | Table1(4)|

```{r jop_Gelbach_etal_2012}
df<- readRDS("./rawdata/jop_Gelbach_etal_2012.rds")
D <- "gov1_yrs"
Y <- "gfcf_priv_gdp"
Z <- "military_first_alt"
controls <- c("tenure", "stabs", "fuelex_gdp", "oresex_gdp",
              "frac_ethn", "frac_relig", "frac_ling", "pop_yng_pct", 
              "pop_tot", "pop_ru_pct", "land_km", "gdppc_ppp_2005_us")
cl <- "ifs_code"
FE <-NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Gelbach_etal_2012_sav, echo = FALSE}
save(g, file="./estimate/Gelbach2012.RData")
```




## @grossman2017

| Replication Summary | |
|----------------|--------------------------------------|
| Unit of analysis | region * year |
| Treatment | government fragmentation |
| Instrument | the number of distinct landmasses; |
| | length of medium and small streams; |
| | over-time variation in the number of regional governments |
| Outcome | public goods provision |
| Model | Table1(8)|

```{r jop_Grossman_2017}
df<-readRDS("./rawdata/jop_Grossman_2017.rds")
Y <- "ServicesCA"
D <- "ladminpc_l5"
Z <- c("lmeanMINUSi_adminpc_l6", "lmeanMINUSi_adminpc2_l6", 
       "herf", "herf2", "llength", "llength2")
controls <- c("lpop_l", "wdi_urban_l", "lgdppc_l", "conflict_l",
              "dpi_state_l", "p_polity2_l", 
              "loilpc_l", "aid_pc_l","al_ethnic")
cl <- "ccodecow"
FE <- "year"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Grossman_2017_sav, echo = FALSE}
save(g, file="./estimate/Grossman2017.RData")
```




## @healy2013

| Replication Summary | |
|----------------|--------------------------------------|
| Unit of analysis | individual |
| Treatment | the share of a respondent's siblings who are female |
| Instrument | whether the younger sibling is a sister |
| Outcome | gender-role attitude in 1973 |
| Model | Table1(1)|

```{r jop_Healy_etal_2013}
df <- readRDS("./rawdata/jop_Healy_etal_2013.rds")
D <-"share_sis"
Y <- "womens_rights73"
Z <- "closest"
controls <- "num_sib"
cl <- "PSU"
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Healy_etal_2013_sav, echo = FALSE}
save(g, file="./estimate/Healy2013.RData")
```


## @henderson2016mediating (a)

| Replication Summary | |
|----------------|-------------------|
| Unit of analysis | district\*year |
| Treatment | Democratic vote margins |
| Instrument | rain around election day |
| Outcome | incumbent roll call positioning |
| Model | Table3(1)|

```{r jop_Henderson_etal_2016}
df<- readRDS("./rawdata/jop_Henderson_etal_2016.rds")
df$fe_id_num<-df$`as.factor(fe_id_num)`
D <- "dose"
Y <- "vote"
Z <- c("rain_day", "rain_day_prev")
controls <- c("d_inc", "dist_prev", "midterm", "pres_party", "black", 
              "construction", "educ", "minc", "farmer", "forborn", 
              "gvtwkr", "manuf", "pop", "unempld", "urban", "retail", 
              "sos", "gov", "comp_cq", "redistricted", "dose_prv", "vote_prv")
cl <- "fe_id_num" # incumbent
FE <- "fe_id_num"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Henderson_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Henderson2016_a.RData")
```



## @henderson2016mediating (b)

| Replication Summary | |
|----------------|-------------------|
| Unit of analysis | district\*year |
| Treatment | Democratic vote margins |
| Instrument | rain around election weekend |
| Outcome | incumbent roll call positioning |
| Model | Table3(2)|

```{r jop_Henderson_etal_2016b}
df<- readRDS("./rawdata/jop_Henderson_etal_2016.rds")
df$fe_id_num<-df$`as.factor(fe_id_num)`
D <- "dose"
Y <- "vote"
Z <- c("rain_weekend", "rain_weekend_prev")
controls <- c("d_inc", "dist_prev", "midterm", "pres_party", "black", 
              "construction", "educ", "minc", "farmer", "forborn", 
              "gvtwkr", "manuf", "pop", "unempld", "urban", "retail", 
              "sos", "gov", "comp_cq", "redistricted", "dose_prv", "vote_prv")
cl <- "fe_id_num" # incumbent
FE <- "fe_id_num"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Henderson_etal_2016b_sav, echo = FALSE}
save(g, file="./estimate/Henderson2016_b.RData")
```




## @johns2016

| Replication Summary | |
|----------------|--------------------------------|
| Unit of analysis | WTO dispute |
| Treatment | the number third parties |
| Instrument | trade stake of the rest of the world |
| Outcome | becoming a third party |
| Model | Table2(2)|

```{r jop_Johns_etal_2016}
df<-readRDS("./rawdata/jop_Johns_etal_2016.rds")
D='third_num_excl'
Y='thirdparty'
Z='ln_ROW_before_disp'
controls=c("ln_gdpk_partner", "ln_history_third", "ln_history_C",
    "Multilateral", "trade_before_dispute",  "ARTICLEXXII")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Johns_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Johns2016.RData")
```


## @kriner2014

| Replication Summary | |
|----------------|-------------------------------------|
| Unit of analysis | month |
| Treatment | committee investigations |
| Instrument | number of days that Congress was in session in a given month |
| Outcome | presidential approval |
| Model | Table1(1)|

```{r jop_Kriner_etal_2014}
df<-readRDS("./rawdata/jop_Kriner_etal_2014.rds")
D <- "misconductdays"
Y <- "approval"
Z <- "alldaysinsession"
controls <- c("icst1", "positive", "negative", "vcaslast6mos",
              "iraqcaslast6mos", "honeymoon", "approvalt1", "ike","jfk",
              "lbj","rmn","ford","carter","reagan","bush","clinton","wbush")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Kriner_etal_2014_sav, echo = FALSE}
save(g, file="./estimate/Kriner2014.RData")
```

## @lei2022private

| Replication Summary | |
|----------------|-------------------------|
| Unit of analysis | city*year |
| Treatment | subway approval |
| Instrument | whether the city has more than 3 million residents* population size |
| Outcome | mayor promotion |
| Model | Table3(A)|

```{r jop_lei_2022}
df<-readRDS("./rawdata/jop_Lei_2022.rds")
Y <-'Mayor_promotion3y'
D <-'Mayor_plan'
Z <-'iv1'
controls<-c( 'Per_pop_2', 'iv1_int')
cl<-"City_Code"
FE<-c("provinceyear","City_Code")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Lei_2022_sav, echo = FALSE}
save(g, file="./estimate/Lei2022.RData")
```



## @lerman2017

| Replication Summary | |
|----------------|-------------------------|
| Unit of analysis | individual |
| Treatment | public versus only private health insurance |
| Instrument | born 1946 or 1947 |
| Outcome | support ACA |
| Model | Table1(1)|

```{r jop_Lerman_2017}
df<-readRDS("./rawdata/jop_Lerman_2017.rds")
Y <-'suppafford'
D <-'privpubins3r'
Z <-'byr4647'
controls<-c( 'rep', 'ind', 'con', 'mod',
              'ideostrength', 'hcsocial', 'fininsur',
             'healthcaresupport', 'child18', 'male',
             'married', 'labor', 'mobility', 'homeowner', 
             'religimp','employed', 'votereg', 'vote08', 
             'black', 'hispanic2', 'military', 'educ',
              'fincome', 'newsint', 'publicemp', 'bornagain')
cl<-NULL
FE<-NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_Lerman_2017_sav, echo = FALSE}
save(g, file="./estimate/Lerman2017.RData")
```



## @lorentzen2014

| Replication Summary | |
|----------------|---------------------------|
| Unit of analysis | city |
| Treatment | large firm dominance in 2007 |
| Instrument | same variable measured in 1999 |
| Outcome | pollution information transparency index |
| Model | Table1(2)|

```{r jop_Lorentzen_2014}
df<-readRDS("./rawdata/jop_Lorentzen_2014.rds")
D <- "lfd2007"
Y <- "pitiave3"
Z <- "lfd99"
controls <- c("lbudgetrev", "lexpratio", "tertratio", "sat_air_pca")
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Lorentzen_2014_sav, echo = FALSE}
save(g, file="./estimate/Lorentzen2014.RData")
```




## @pianzola2019

| Replication Summary | |
|----------------|----------------------------|
| Unit of analysis | individual |
| Treatment | smartvote use |
| Instrument | random assignment of the e-mail treatment |
| Outcome | vote intentions |
| Model | Table4(3)|

```{r jop_Pianzola_etal_2019}
df <- readRDS("./rawdata/jop_Pianzola_etal_2019.rds")
D <- "smartvote"
Y <- "diff_top_ptv"
Z <- "email"
controls <- NULL
cl <- NULL
FE <- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Pianzola_etal_2019_sav, echo = FALSE}
save(g, file="./estimate/Pianzola2019.RData")
```




## @schleiter2016

| Replication Summary | |
|----------------|-------------------|
| Unit of analysis | election |
| Treatment | opportunistic election calling |
| Instrument | prime Minister dissolution power |
| Outcome | vote share of Prime Minister's party |
| Model | Table3(b4) |

```{r jop_Schleiter_etal_2016}
df<- readRDS("./rawdata/jop_Schleiter_etal_2016.rds")
D <- "term2"
Y <- "pm_voteshare_next"
Z <- "disspm"
controls <- c("pm_voteshare", "gdp_chg1yr", "cpi1yr",  "dumcpi1yr")
cl <- "countryn"
FE <- "decade"
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Schleiter_etal_2016_sav, echo = FALSE}
save(g, file="./estimate/Schleiter2016.RData")
```




## @schubiger2021state

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | community |
| Treatment | exposure to state violence |
| Instrument | location of a community inside or outside the emergency zone |
| Outcome | counterinsurgent mobilization |

```{r,jop_schubiger_2021}
df <-readRDS("./rawdata/jop_Schubiger_2021.rds")
D <- "violence_est_period2"
Y<-"autodefensa"
Z <- "emzone"
controls <-"distance"
cl<- NULL
FE<- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_schubiger_2021_sav, echo = FALSE}
save(g, file="./estimate/Schubiger2021.RData")
```



## @stewart2017

| Replication Summary | |
|----------------|-------------------------------------|
| Unit of analysis | insurgency\*year |
| Treatment | foreign territory |
| Instrument | log total border length and the total number of that state's neighbors |
| Outcome | civilian casualties |
| Model | Table3(1)|

```{r jop_Stewart_2017}
df <- readRDS("./rawdata/jop_Stewart_2017.rds")
D <- "exterrdum_low"
Y <- "oneside_best_log"
Z <- "total_border_ln"
controls <- c("bd_log", "terrdum", "strengthcent_ord", "rebstrength_ord", 
              'nonmilsupport', 'rebestsize', 'l1popdensity',
              'l1gdppc_log','l1gdppc_change')
cl <- NULL
FE <- c("year","countrynum")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Stewart_2017_sav, echo = FALSE}
save(g, file="./estimate/Stewart2017.RData")
```




## @urpelainen2022electoral

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | district*year |
| Treatment | wind turbine capacity |
| Instrument | time trend multiplied by the wind resource of the electoral district |
| Outcome | Democratic vote |
| Model | Table3(B1)|

```{r jop_urpelainen_2022}
df <-readRDS("./rawdata/jop_urpelainen_2022.rds")
D <- "cum_capacity_turbine"
Y<-"demvotesmajorpercent"
Z <- "inter"
controls <-NULL
cl<- "district_fixed"
FE<- c("stateyear_fixed","district_fixed")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```


```{r jop_urpelainen_2022_sav, echo = FALSE}
save(g, file="./estimate/Urpelainen2022.RData")
```



## @webster2022social

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | individual |
| Treatment | percentage of angry words that a respondent wrote in his or her emotional recall prompt |
| Instrument | treatment assignment indicator |
| Outcome | social polarization: do favors |
| Model | Table2(1)|


```{r jop_webster_2022}
df <-readRDS("./rawdata/jop_Webster_2022.rds")
D <- "anger"
Y<-"fourpack_1_01"
Z <- "treated"
controls <-"democrat"
cl<- NULL
FE<- NULL
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_webster_2022_sav, echo = FALSE}
save(g, file="./estimate/Webster2022.RData")
```

## @west2017

| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | individual |
| Treatment | Obama win |
| Instrument | IEM (prediction market) price |
| Outcome | political efficacy |
| Model | Table1(4)|

```{r jop_West_2017}
df<- readRDS("./rawdata/jop_West_2017.rds")
D <- "obama"
Y <- "newindex"
Z <- "avgprice"
controls <- c("partyd1", "partyd2", "partyd3",
              "partyd4", "partyd5", "wa01_a", "wa02_a", 
              "wa03_a", "wa04_a", "wa05_a",   "wfc02_a",
              "ra01_b",  "rd01", "wd02_b", "rkey",
              "wave_1", "dt_w12", "dt_w12_2")
cl <- NULL
FE <- c("state","religion")  
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_West_2017_sav, echo = FALSE}
save(g, file="./estimate/West2017.RData")
```




## @ziaja2020


| Replication Summary | |
|----------------|---------------------|
| Unit of analysis | country\*year |
| Treatment | number of democracy donors |
| Instrument | constructed instrument |
| Outcome | democracy scores |
| Model | Table1(B2)|

```{r jop_Ziaja_2020}
df <-readRDS("./rawdata/jop_Ziaja_2020.rds")
D <- "l.CMgnh"
Y <- "v2x.polyarchy.n"
Z <- "l.ZwvCMgwh94"
controls <-c("l.pop.log.r", "l.gdpcap.log.r", "l.war25")
cl<- "cnamef"
FE<- c("cnamef", "periodf")
weights<-NULL
(g<-ivDiag(data=df, Y=Y, D=D, Z=Z, controls=controls, FE =FE, 
  cl =cl,weights=weights, cores = cores))
```

```{r, cache = FALSE}
plot_coef(g)
```

```{r jop_Ziaja_2020_sav, echo = FALSE}
save(g, file="./estimate/Ziaja2020.RData")
```

